/* nbd-server.h */

#ifndef NBD_SERVER_H_FILE
#define NBD_SERVER_H_FILE

typedef struct NBD_SERVER {
  int sock;
} NBD_SERVER;

int nbd_server_open(NBD_SERVER *srv);
void nbd_server_close(NBD_SERVER *srv);
void nbd_server_run(NBD_SERVER *srv, char *image_file);
void nbd_server_handle_connection(int sock, const char *image_file);

#endif /* NBD_SERVER_H_FILE */
